
//导入axios工具包
import instance from '@/utils/axios.js'
//导入token工具包
import { getToken } from '@/utils/token.js'

/* 用户接口 */


//1.登录

function userLogin( {mobile,code} ){
    return instance({
        url:'/v1_0/authorizations',
        method:'post',
        data:{
            mobile,code
        }
    })
}

//导出接口
export { userLogin }

//2.获取用户信息
function getUserInfo(){
    return instance({
        url:'/v1_0/user/profile',
        method:'get',
        headers:{
            'Authorization': `Bearer ${getToken().token}`
        }
    })
}

export { getUserInfo }

